package com.cdc.dimen;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Context;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;

import com.cdc.dp.ScreenAdaptation;

import org.json.JSONException;
import org.json.JSONObject;

public class MainActivity extends AppCompatActivity{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ScreenAdaptation.getScreenAndModel(this);

        float px=ScreenAdaptation.dpToPx(this,320f);
        Log.e("pxpx",String.valueOf(px));
    }

  /*  {
        "density":"3.375",
            "dpi":"540",
            "heightPixels":"1920",
            "widthPixels":"1080",
            "scaledDensity":"3.375",
            "xdpi":"397.565",
            "ydpi":"399.737",
            "xdp":"320.0",
            "ydp":"568.8889",
            "os":"7.1.1",
            "brand":"samsung",
            "model":"SM-A7100",
            "versionName":"1.0.1",
            "versionCode":"2",
            "baseDpi":"320dp"
    }*/

}